<?php
use BLL\DataModel as DM;
$helper = new DM\DataContractHelper();
$helper->loadFromConfig("GeneralForm");
//$items = $helper->dataContract["target"][0]["source"][0]["items"];
//foreach($items as $itemName=>$item){
//    echo $itemName." =><br>";
//    var_dump($item);
//}

$gen = new BLL\DAO\FormReaderGenerator($helper);

$output = $gen->generate();

$str = BLL\Common\CodeGeneratorHelper::generatr($output);
$path = app_path() . DIRECTORY_SEPARATOR . "models" . DIRECTORY_SEPARATOR . "DataContract" . DIRECTORY_SEPARATOR;
file_put_contents($path . $helper->dataContract["outPutName"].".php", $str);
?>